<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 小军伟
  Date: 2019/11/1
  Time: 17:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>显示所有学生</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="${pageContext.request.contextPath}/ico/aaa.ico" rel="SHORTCUT ICON">

    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.css">

    <%--<link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css">--%>
    <script src="${pageContext.request.contextPath}/js/jquery-1.12.4.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.js"></script>
</head>
<body>
    <table class="table table-hover">
        <tr>
            <th>学生ID</th>
            <th>学生姓名</th>
            <th>密码</th>
            <th>性别</th>
            <th>注册时间</th>
            <th>班级id</th>
        </tr>
        <c:forEach items="${pageInfo.list}" var="student">
            <tr>
                <td>${student.id}</td>
                <td>${student.username}</td>
                <td>***********</td>
                <td>${student.gender}</td>
                <td>${student.time1}</td>
                <td>${student.clazId}</td>
            </tr>
        </c:forEach>
    </table>
    <div class="pagenation">
        <a href="${pageContext.request.contextPath}/listStudent?pageNum=${pageInfo.prePage}">《上一页</a>
        <c:forEach var="i" begin="${pageInfo.navigateFirstPage}" end="${pageInfo.navigateLastPage}" step="1">
            <c:if test="${i!=pageInfo.pageNum}">
                <a href="${pageContext.request.contextPath}/listStudent?pageNum=${i}"
                   class="active">${i}</a>
            </c:if>
            <c:if test="${i==pageInfo.pageNum}">
                <a href="#" class="active">${i}</a>
            </c:if>
        </c:forEach>
        <a href="${pageContext.request.contextPath}/listStudent?pageNum=${pageInfo.nextPage}">下一页》</a>
    </div>
</body>
</html>
